package com.example.pingxue.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.SQLRestriction;

@Entity
@Getter
@Setter
@SQLRestriction("is_deleted = 0")
public class Selection extends LogicEntity {
    @Column
    private Double midScore;
    @Column
    private Double finalScore;
    @Column
    private Double performanceScore;

    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnoreProperties(value = {"selections"})
    private Student student;

    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnoreProperties(value = {"selections"})
    private TClass clazz;

    public Selection() {};
    public Selection(Student student, TClass clazz) {
        this.student = student;
        this.clazz = clazz;
    }



}
